package it.polimi.reTraveldream.entities;


import it.polimi.reTravelDream.dto.HotelDTO;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * Entity implementation class for Entity: Hotel
 *
 */

@Entity
@Table(name="hotels")
@NamedQueries({
	@NamedQuery(name=Hotel.FIND_ALL,
            query="SELECT h FROM Hotel h")

})

public class Hotel implements Serializable {

		public static final String FIND_ALL = "Hotel.findAll";	
	
	
	@Id
	private int id;
	private String city;
	private String name;
	private String description;
	private String address;
	private int stars;
	private static final long serialVersionUID = 1L;
	private int price;
	private boolean isActive;

	public Hotel() {
	}  
	
	public Hotel(HotelDTO hotelDTO) {
		super();
		this.id=hotelDTO.getId();
		this.name=hotelDTO.getName();
		this.city=hotelDTO.getCity();
		this.description=hotelDTO.getDescription();
		this.address=hotelDTO.getAddress();
		this.stars=hotelDTO.getStars();
		this.price=hotelDTO.getPrice();
		this.isActive=hotelDTO.isActive();
	} 
	
	
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}   
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}   
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}   
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}   
	public int getStars() {
		return this.stars;
	}

	public void setStars(int stars) {
		this.stars = stars;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}


   
}
